Page({
  data: {
    name: '',
    age: '',
    day: '',
    temperature: '',
    bleeding: ''
  },
  bindNameInput: function (e) {
    this.setData({
      name: e.detail.value
    });
  },
  bindAgeInput: function (e) {
    this.setData({
      age: e.detail.value
    });
  },
  bindTemperatureInput: function (e) {
    this.setData({
      temperature: e.detail.value
    });
  },
  bindBleedingChange: function (e) {
    this.setData({
      bleeding: e.detail.value
    });
  },
  bindDayChange: function (e) {
    this.setData({
      day: e.detail.value
    });
  },
  onNext: function () {
    if (this.data.name && this.data.age && this.data.day && this.data.temperature && this.data.bleeding) {
      // console.log('11111')
      // const currentPage = parseInt(this.route.split('page')[1]) + 1;
      // const nextPage = `/pages/survey/page${currentPage}/page${currentPage}`;
      wx.navigateTo({
        url: '/pages/survey/page2/page2'
      });
    } else {
      wx.showToast({
        title: '请填写所有信息',
        icon: 'none'
      });
    }
  }
});